package com.accompany.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 交易记录表
 * </p>
 *
 * @author DC
 * @since 2024-12-26
 */
@Data
@Schema(name = "Transactions对象", description = "交易记录表")
public class Transaction implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(name = "userId", description = "用户ID")
    private Long userId;

    @Schema(name = "orderId", description = "关联订单ID")
    private Long orderId;

    @Schema(name = "amount", description = "交易金额")
    private BigDecimal amount;

    @Schema(name = "type", description = "交易类型 1:充值 2:提现 3:收入 4:支出")
    private Byte type;

    @Schema(name = "status", description = "状态 0:处理中 1:成功 2:失败")
    private Byte status;

    @Schema(name = "remark", description = "备注")
    private String remark;

    private LocalDateTime createdAt;
}
